<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use TencentIm\Application;

class WeatherController extends Controller
{

    public function show(Request $request, $city)
    {
        $options = [
            //'corp_id' => 'dingiqylfcnq1yv51bqc',
            //'corp_secret' => '5w4spe1mUKxFNz_SyEg6H9OwuBy4hJonWbOj0YImEi2ws9N9o8avG6_74i9utF6V',
            'app_id'     => '1400055880',
            'app_secret' => 'MHcCAQEEIF1YA4Fa7YHsUPArDENI+bf8oZ7mDrATmc0mP11l5bR+oAoGCCqGSM49AwEHoUQDQgAEii6rJ67VIJkswYRgCB6qca5UEKC+R1fO29VSPVAqz9HVEmSDftbSSU61nwUiE9kCFqdDfnEytmm/a1wAqSjPMg==',
            'key_path'   => resource_path('tencent/im/private_key'),
        ];
        $app     = new Application($options);
        dda($app->credential->generate_user_sig('guanshaoqiu'));
        //return $app;
    }
}